package com.gxuwz.dx_qz_school.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.gxuwz.dx_qz_school.BalanceActivity;
import com.gxuwz.dx_qz_school.CardActivity;
import com.gxuwz.dx_qz_school.CodeActivity;
import com.gxuwz.dx_qz_school.EditActivity;
import com.gxuwz.dx_qz_school.LossActivity;
import com.gxuwz.dx_qz_school.R;
import com.gxuwz.dx_qz_school.RecordActivity;
import com.gxuwz.dx_qz_school.UnlockActivity;


public class CardFragment extends Fragment {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_card_fragment);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_card_fragment, container, false);

        TextView tv_scan2 = view.findViewById(R.id.tv_scan2);
        tv_scan2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), CodeActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_charge2 = view.findViewById(R.id.tv_charge2);
        tv_charge2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), CardActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_payDetail = view.findViewById(R.id.tv_payDetail);
        tv_payDetail.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), RecordActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_balances = view.findViewById(R.id.tv_balances);
        tv_balances.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), BalanceActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_edit = view.findViewById(R.id.tv_edit);
        tv_edit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), EditActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_cardLock = view.findViewById(R.id.tv_cardLock);
        tv_cardLock.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), LossActivity.class);
                startActivity(intent);
            }
        });

        TextView tv_cardUnLock = view.findViewById(R.id.tv_cardUnLock);
        tv_cardUnLock.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), UnlockActivity.class);
                startActivity(intent);
            }
        });


        return view;
    }
}